package com.ruoyi.hospital.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.hospital.domain.YlGuide;
import com.ruoyi.hospital.mapper.YlGuideMapper;
import com.ruoyi.hospital.service.IYlGuideService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 楼层信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-02-16
 */
@Service
public class YlGuideServiceImpl implements IYlGuideService
{
    @Autowired
    private YlGuideMapper ylGuideMapper;

    /**
     * 查询楼层信息
     * 
     * @param guideId 楼层信息主键
     * @return 楼层信息
     */
    @Override
    public YlGuide selectYlGuideByGuideId(Long guideId)
    {
        return ylGuideMapper.selectYlGuideByGuideId(guideId);
    }

    /**
     * 查询楼层信息列表
     * 
     * @param ylGuide 楼层信息
     * @return 楼层信息
     */
    @Override
    public List<YlGuide> selectYlGuideList(YlGuide ylGuide)
    {
        return ylGuideMapper.selectYlGuideList(ylGuide);
    }

    /**
     * 新增楼层信息
     * 
     * @param ylGuide 楼层信息
     * @return 结果
     */
    @Override
    public int insertYlGuide(YlGuide ylGuide)
    {
        ylGuide.setCreateTime(DateUtils.getNowDate());
        return ylGuideMapper.insertYlGuide(ylGuide);
    }

    /**
     * 修改楼层信息
     * 
     * @param ylGuide 楼层信息
     * @return 结果
     */
    @Override
    public int updateYlGuide(YlGuide ylGuide)
    {
        ylGuide.setUpdateTime(DateUtils.getNowDate());
        return ylGuideMapper.updateYlGuide(ylGuide);
    }

    /**
     * 批量删除楼层信息
     * 
     * @param guideIds 需要删除的楼层信息主键
     * @return 结果
     */
    @Override
    public int deleteYlGuideByGuideIds(Long[] guideIds)
    {
        return ylGuideMapper.deleteYlGuideByGuideIds(guideIds);
    }

    /**
     * 删除楼层信息信息
     * 
     * @param guideId 楼层信息主键
     * @return 结果
     */
    @Override
    public int deleteYlGuideByGuideId(Long guideId)
    {
        return ylGuideMapper.deleteYlGuideByGuideId(guideId);
    }
}
